#
# /etc/sshd_config
# PermitRootLogin yes
#

$CONF = "/etc/sshd_config";

if ( -e $CONF && -r $CONF && -f $CONF && -T $CONF ) {
    open ( F, $CONF ) || die "$CONF: $!\n";
    @lines = <F>;
    foreach $line ( @lines ) {
	chomp $line;

	next unless $line =~ /PermitRootLogin\s+(yes|no)/;

	if ( $line =~ "^PermitRootLogin\s+yes" ) {
	    print "Enabled Root SSH Login" . "\n";
	} else {
	    print "Disabled Root SSH Login" . "\n";
	}
    }
    close (F);
}
